home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / prog / asm_0_m.arj / JDOS.DOC < prev    next >
Text File  |  1989-03-18  |  14KB  |  385 lines

  1.                                JDOS Documentation
  2.                                Richard B. Johnson
  3.                                 PROGRAM EXCHANGE
  4.                                  March 15, 1989
  5.           Forward.
  6.           JDOS is a terminate and stay resident program (TSR) that
  7.           uses VERY LITTLE MEMORY! The resident portion is only about
  8.           3 kb.
  9.  
  10.           When installed, JDOS allows the user to activate a copy of
  11.           the DOS command-processor by typing ^\ (control-backslash)
  12.           while within a program. The command-processor will be acti-
  13.           vated for the user if the following conditions are met:
  14.  
  15.                (1) The program in use has not acquired ALL of the
  16.                system memory.
  17.  
  18.                (2) The program in use has followed DOS's rules for
  19.                memory management.
  20.  
  21.                (3) There is sufficient disk-space on the default drive
  22.                to write two files totaling about 700 kb in size. These
  23.                files are deleted as soon as JDOS returns to the inter-
  24.                rupted program.
  25.  
  26.           Usage:
  27.           JDOS <return>
  28.  
  29.           Note:
  30.           You should see a signon-message on your screen. If you do
  31.           not see this message, your base-board switches or CMOS are
  32.           not set properly to define the screen-card that you are us-
  33.           ing. In this case, the screen contents will not be restored
  34.           after you exit the JDOS window. You might be able to fix
  35.           this with the proper DOS "MODE" command in your AUTOEXEC.BAT
  36.           file.
  37.  
  38.           If you hit ^\ while at the DOS prompt, the console bell will
  39.           sound but nothing else will happen until you execute a tran-
  40.           sient program. That program will then be interrupted as soon
  41.           as JDOS finds a safe time to interrupt. If you accidentally
  42.           interrupt a program, you just wait until the JDOS window ap-
  43.           pears then type EXIT to return to your interrupted program.
  44.  
  45.           Depending upon how fast your hard-disk drive operates, it
  46.           may take several seconds to activate the JDOS window and
  47.           several seconds to get back to your interrupted task. This
  48.           may seem like a long time, but once you get to the JDOS
  49.           window, you will have MOST of the system memory available
  50.           for another application program! Other TSR programs of this
  51.           type permanently acquire large amounts of system memory when
  52.           installed. They then allow only very small programs to be
  53.           activated within the "window". JDOS saves most of the system
  54.           memory contents to disk so it can be used for applications
  55.           programs.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                      - 1 -
  64.           
  65.  
  66.  
  67.  
  68.  
  69.           How it works.
  70.           When invoked at the DOS command-line, JDOS installs itself
  71.           and leaves about 3 kb resident in memory. JDOS continually
  72.           monitors the keyboard, waiting for the control-function, ^\
  73.           to be typed by the user.
  74.  
  75.           If the control-function is typed, JDOS sets a flag that
  76.           tells it to become active as soon as possible. The system
  77.           clock provides an interrupt about 18 times every second.
  78.           When this interrupt is activated, JDOS checks to see if the
  79.           flag has been set, requesting that it become active. If the
  80.           flag has been set, JDOS checks to see if the interrupted
  81.           program lies above JDOS in memory and below the DOS BIOS
  82.           services. If this is true, JDOS does the following:
  83.  
  84.                (1) Saves the current screen mode.
  85.  
  86.                (2) Saves all the characters on the screen in a hidden
  87.                file called SCREEN.$$$.
  88.  
  89.                (3) Saves the cursor type and position.
  90.  
  91.                (4) Saves the contents of the interrupt table.
  92.  
  93.                (5) Saves the state of four possible UARTs for communi-
  94.                cations adapters, COM1 through COM4, then disables
  95.                interrupt control on all of them.
  96.  
  97.                (6) Masks off interrupts IRQ3 and IRQ4 that communica-
  98.                tions programs use.
  99.  
  100.                (7) Sets the timer-tick interrupt that the interrupted
  101.                program might be using to a dummy routine.
  102.  
  103.                (8) Sets the system-timer interrupt, that the inter-
  104.                rupted program might be (dishonorably) using back to
  105.                the correct vector.
  106.  
  107.                (9) Saves the user's data-transfer area.
  108.  
  109.                (10) Saves the default directory and disk.
  110.  
  111.                (11) Saves the contents of memory in a hidden file
  112.                called VIRTUAL.MEM.
  113.  
  114.                (12) Releases memory to load and execute the DOS
  115.                command processor.
  116.  
  117.                (13) Loads the command processor.
  118.  
  119.                (14) At this time, the user may execute DOS commands
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                      - 2 -
  128.           
  129.  
  130.  
  131.  
  132.                and may also execute other programs. Since most of the
  133.                memory contents will have been saved in a file, the
  134.                user will have most of the system memory available for
  135.                application programs.
  136.  
  137.           After the user types EXIT at the DOS command line, the
  138.           following things occur:
  139.  
  140.  
  141.                (15) The command-processor returns to JDOS.
  142.  
  143.                (16) The default disk and directory are restored.
  144.  
  145.                (17) The memory released is reacquired.
  146.  
  147.                (18) The saved memory contents from the file are
  148.                written back to memory.
  149.  
  150.                (19) The memory-file is deleted (VIRTUAL.MEM).
  151.  
  152.                (20) The screen mode, cursor type, and position is
  153.                restored.
  154.  
  155.                (21) The screen contents are restored from a file.
  156.  
  157.                (22) The screen file is deleted (SCREEN.$$$).
  158.  
  159.                (23) The data-transfer area is restored.
  160.  
  161.                (24) The contents of the interrupt table is restored.
  162.  
  163.                (25) The interrupt-controller mask is restored to
  164.                enable the interrupted program's interrupts.
  165.  
  166.                (26) The state of the four possible UARTS for the
  167.                communications adapter ports COM1 through COM4 are
  168.                restored including any interrupt-enable bits.
  169.  
  170.                (27) JDOS returns to the interrupted program.
  171.  
  172.           If everything went according to plan, the user continues
  173.           with his work. JDOS may again be activated at any time.
  174.  
  175.           Possible problems:
  176.           There are several things that could go wrong that would
  177.           prevent JDOS from performing correctly. Much care has been
  178.           taken to help prevent a system crash in the event that
  179.           everything didn't go according to plan. Usually, in the
  180.           event of an error, JDOS simply refuses to load the command
  181.           processor and returns to the interrupted task. There are a
  182.           few things you MUST NOT DO when operating in the JDOS
  183.           "window".
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.                                      - 3 -
  192.           
  193.  
  194.  
  195.  
  196.  
  197.  
  198.                (1) Do NOT load a TSR program! JDOS needs the memory
  199.                that the TSR would use and has absolutely no way of
  200.                returning to the interrupted program if this memory
  201.                gets taken away by the TSR program.
  202.  
  203.                (2) Do NOT run CHKDSK with the /F option! There may be
  204.                many open files who's buffers haven't been written to
  205.                disk when JDOS interrupts the task. CHKDSK will assume
  206.                these files are bad and truncate them to zero-length!
  207.  
  208.                (3) Do NOT activate another TSR like Sidekick(tm) or
  209.                Superkey(tm) while inside the JDOS window! Usually you
  210.                can get away with this, but not always. You can improve
  211.                your chances by loading JDOS last.
  212.  
  213.                (4) Do NOT run a program that alters your disk struc-
  214.                ture (like Peter Norton's SD)! This could cause the
  215.                same problems as DOS's CHKDSK.
  216.  
  217.                (5) If operating from a floppy disk, do not remove the
  218.                default disk from the drive! If JDOS can't open the
  219.                virtual-memory file, it will abort so you can't get
  220.                back to the interrupted program.
  221.  
  222.                (6) JDOS creates then deletes two files, VIRTUAL.MEM
  223.                and SCREEN.$$$. These files will reside in the top
  224.                directory of the default disk. They are normally hid-
  225.                den. Should you delete them while in the JDOS window,
  226.                you'll be up the creek without a paddle once you exit
  227.                the JDOS window.
  228.  
  229.  
  230.           If you follow these rules, JDOS should be a useful addition
  231.           to your utilities.
  232.  
  233.                                  ERROR MESSAGES
  234.  
  235.                Need DOS version 3.00 or higher to execute!
  236.           Some versions of DOS 2.XX do not always work. You really
  237.           need DOS 3.XX for all modern applications.
  238.  
  239.                JDOS is already installed!
  240.           You tried to load JDOS again. It won't let you.
  241.  
  242.                Can't load command processor <CR>
  243.           The program that was interrupted had acquired ALL of the
  244.           system memory and won't release any! Just hit the <CR> and
  245.           JDOS will return to the interrupted task.
  246.  
  247.           If this message occurs immediately upon loading JDOS, it
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.                                      - 4 -
  256.           
  257.  
  258.  
  259.  
  260.           means that the command interpreter, COMMAND.COM can't be
  261.           located because of a corrupt environment. Type SET at the
  262.           DOS prompt and verify that the "COMSPEC=" parameter points
  263.           to a valid filename. This should be the COMMAND.COM file
  264.           that DOS loaded at boot-time.
  265.  
  266.                Can't create file \VIRTUAL.MEM
  267.           Not enough directory space in your top directory or not
  268.           enough file "handles" available. Put FILES=30 in your
  269.           CONFIG.SYS file then reboot.
  270.  
  271.                Can't write file \VIRTUAL.MEM
  272.           You are out of disk space. JDOS needs about 700 kb. This
  273.           single file can be as large as 620 kb.
  274.  
  275.                Can't close file \VIRTUAL.MEM
  276.           A disk allocation error prevents updating the directory.
  277.  
  278.                Can't open file \VIRTUAL.MEM
  279.           File was not created because of a previous error.
  280.  
  281.                Can't delete file \VIRTUAL.MEM
  282.           File was not created because of a previous error.
  283.  
  284.                Can't read file \VIRTUAL.MEM
  285.           File was not closed properly because of a previous error.
  286.  
  287.                Can't create file \SCREEN.$$$
  288.           Not enough directory space in your top directory or not
  289.           enough file "handles" available. Put FILES=30 in your
  290.           CONFIG.SYS file then reboot.
  291.  
  292.                Can't write file \SCREEN.$$$
  293.           You are out of disk space. JDOS needs about 700 kb. This
  294.           file is 64 kb in size.
  295.  
  296.                Can't close file \SCREEN.$$$
  297.           Disk allocation error prevents updating the directory.
  298.  
  299.                Can't open file \SCREEN.$$$
  300.           File was not created because of a previous error.
  301.  
  302.                Can't delete file \SCREEN.$$$
  303.           File was not created because of a previous error.
  304.  
  305.                Can't read file \SCREEN.$$$
  306.           File was not closed properly because of a previous error.
  307.  
  308.           If you want to laugh, please read the following message
  309.           stolen from a software instruction manual.
  310.  
  311.                                     WARRANTY
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.                                      - 5 -
  320.           
  321.  
  322.  
  323.  
  324.  
  325.           This material, hereunder referred to as software, whether or
  326.           not in machine-readable form, or existing in the manner re-
  327.           ferred to as source-code, whether or not in a compiler-
  328.           usable form, or existing as a memory image either as object-
  329.           code or binary controls to microprocessor modalities and
  330.           instructions, has neither express nor implied warranties of
  331.           any kind including, but not limited to, merchantability,
  332.           fitness for any particular purpose, or non-infringement of
  333.           patents, copyrights or other proprietary rights of others,
  334.           or any liability or responsibility for damages of any kind,
  335.           including special, indirect or consequential damages,
  336.           arising out of or resulting from the use of same made
  337.           available hereunder, or the use or modification thereof, the
  338.           sole remedy of which is limited, at our option, to the
  339.           replacement of this notice should it become defective in
  340.           normal use for a period not to exceed an unspecified time.
  341.           Some countries, states and principalities do not allow
  342.           limited warranties so this notice may not apply to you.
  343.  
  344.           In other words, "you usa da program, you taka you chances"!
  345.           The source-code is provided so that users may determine for
  346.           themselves if this program may serve a useful purpose. I
  347.           attempted to follow good standards of engineering practice
  348.           so you should not have too many problems.
  349.  
  350.                 Cheers,
  351.  
  352.                 Richard B. Johnson
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.                                      - 6 -
  384.           
  385.